package com.sl.au.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.sl.au.entity.Root;

@Entity
@Table(name = "sl_dcms_part")
public class Part extends Root{

	@Column(nullable = true)
	private String partName;//部件名称
	
	@Column(nullable = true)
	private String partIdentify;//部件编码
	
	@Column(nullable = true)
	private int partOrder;//部件顺序

	@Column(nullable = true)
	private String partParent;//父级部件
	
	@ManyToOne
	@JoinColumn(name = "partType_id",nullable = true)
	private Option partType;//部件分类
	
	@ManyToOne
	@JoinColumn(name = "partLevel_id",nullable = true)
	private Option partLevel;//部件层级
	
	@Column(name = "iconAddress", nullable = true)
	private String iconAddress;//图标地址

	@Column(name = "memo", nullable = true)
	private String memo;//备注
	
	/*******  用于判断是否需要当前编码  ******/
	// 人员
	@Column(nullable = true,columnDefinition="bit(1) default 1 ")
	private boolean userShow = true;
	// 部件
	@Column(nullable = true,columnDefinition="bit(1) default 1 ")
	private boolean partShow = true;
	// 网格
	@Column(nullable = true,columnDefinition="bit(1) default 1 ")
	private boolean gridShow = true;
	// 事件
	@Column(nullable = true,columnDefinition="bit(1) default 1 ")
	private boolean eventShow = true;

	public String getPartName() {
		return partName;
	}

	public void setPartName(String partName) {
		this.partName = partName;
	}

	public String getPartIdentify() {
		return partIdentify;
	}

	public void setPartIdentify(String partIdentify) {
		this.partIdentify = partIdentify;
	}

	public int getPartOrder() {
		return partOrder;
	}

	public void setPartOrder(int partOrder) {
		this.partOrder = partOrder;
	}

	public String getPartParent() {
		return partParent;
	}

	public void setPartParent(String partParent) {
		this.partParent = partParent;
	}

	public Option getPartLevel() {
		return partLevel;
	}
	public void setPartLevel(Option partLevel) {
		this.partLevel = partLevel;
	}

	public Option getPartType() {
		return partType;
	}

	public void setPartType(Option partType) {
		this.partType = partType;
	}

	public String getIconAddress() {
		return iconAddress;
	}

	public void setIconAddress(String iconAddress) {
		this.iconAddress = iconAddress;
	}

	public boolean isUserShow() {
		return userShow;
	}

	public void setUserShow(boolean userShow) {
		this.userShow = userShow;
	}

	public boolean isPartShow() {
		return partShow;
	}

	public void setPartShow(boolean partShow) {
		this.partShow = partShow;
	}

	public boolean isGridShow() {
		return gridShow;
	}

	public void setGridShow(boolean gridShow) {
		this.gridShow = gridShow;
	}

	public boolean isEventShow() {
		return eventShow;
	}

	public void setEventShow(boolean eventShow) {
		this.eventShow = eventShow;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}
}
